package com.liangge.essaysite.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.liangge.essaysite.bean.Article;
import com.liangge.essaysite.util.Pagination;

public interface ArticleService {
	/**
	 * 根据主键查找记录是否存在
	 * @author liangge
	 */
	public int selectArticleCountByKeys(Map params);
	
	/**
	 * 新增文章
	 * @author liangge
	 */
	public int insertArticle(Article article);
	
	/**
	 * 查找首页最新文章
	 * @author liangge
	 */
	public Pagination<Article> selectNewArticleList(int pageNo);
	
	/**
	 * 查找首页点击排行
	 * @author liangge
	 */
	public Pagination<Article> selectReadArticleList(int pageNo,int limitDays);
	
	/**
	 * 查找首页精华排行
	 * @author liangge
	 */
	public Pagination<Article> selectGoodArticleList(int pageNo,int limitDays);
	
	/**
	 * 查找首页回复排行
	 * @author liangge
	 */
	public Pagination<Article> selectCommentArticleList(int pageNo,int limitDays);
	/**
	 * 查找首页分类列表
	 * @author liangge
	 */
	public Pagination<Article> selectCategoryArticleList(int pageNo,int categoryId);
}
